<?php
class setting extends CI_Controller {
	function index() {
		$this -> pub -> logp('浏览系统信息','2');
		$da = $this -> pub -> get_setting('系统信息', 'Setting');
		$q = $this -> db -> get_where('setting');
		$da['m'] = $q -> row_array(0);
		$this -> load -> view('adminx/setting', $da);
	}

	function up() {
		$this -> pub -> logp('修改系统信息','2');
		$dax['name'] = $this -> input -> post('name');
		$dax['wxAppId'] = $this -> input -> post('wxAppId');
		$dax['wxAppSecret'] = $this -> input -> post('wxAppSecret');
		$dax['note'] = $this -> input -> post('note');
		$dax['fs_numb'] = $this -> input -> post('fs_numb');
		$dax['fs_je'] = $this -> input -> post('fs_je');
		$dax['bj'] = $this -> input -> post('bj');
		$dax['fzgsr'] = $this -> input -> post('fzgsr');
		
		$dax['tj_sp'] = $this -> input -> post('tj_sp');

		$dax['dianzhao'] = $this -> input -> post('dianzhao');
		$dax['logo'] = $this -> input -> post('logo');
		
		$dax['zp_je'] = $this -> input -> post('zp_je');
		$dax['zp_jed'] = $this -> input -> post('zp_jed');
		$dax['zp_numb'] = $this -> input -> post('zp_numb');

		$dax['citys'] = $this -> input -> post('citys');

		$this -> db -> update('setting', $dax);
		echo json_encode(array('type' => 1));
	}

}
?>